import 'package:flutter/material.dart';

class HeadInfo extends InheritedWidget {

  final String userName;
  final Widget child;

  HeadInfo(this.userName, this.child);

  static HeadInfo of(BuildContext context) {
    return context.inheritFromWidgetOfExactType(HeadInfo);
  }

  @override
  Widget build(BuildContext context) {
    return child;
  }

  @override
  bool updateShouldNotify(HeadInfo oldWidget) {
    // TODO: implement updateShouldNotify
    return oldWidget.userName != userName;
  }
}